package com.runyu.cordova.plugin.barcode;

import java.util.List;

import org.json.JSONObject;

public class BarcodeEventInfo {
	private String aimId;
	private List<AreaPoint> barcodeBounds;
	private String barcodeData;
	private String charset;
	private String codeId;
	private String timestamp;

	public JSONObject toJson() {
		JSONObject jsonObject = new JSONObject();
		try {
			jsonObject.put("aimId", aimId);
			jsonObject.put("barcodeBounds", AreaPoint.toJsonArray(barcodeBounds));
			jsonObject.put("barcodeData", barcodeData);
			jsonObject.put("charset", charset);
			jsonObject.put("codeId", codeId);
			jsonObject.put("timestamp", timestamp);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return jsonObject;
	}

	public String getAimId() {
		return aimId;
	}

	public void setAimId(String aimId) {
		this.aimId = aimId;
	}

	public List<AreaPoint> getBarcodeBounds() {
		return barcodeBounds;
	}

	public void setBarcodeBounds(List<AreaPoint> barcodeBounds) {
		this.barcodeBounds = barcodeBounds;
	}

	public String getBarcodeData() {
		return barcodeData;
	}

	public void setBarcodeData(String barcodeData) {
		this.barcodeData = barcodeData;
	}

	public String getCharset() {
		return charset;
	}

	public void setCharset(String charset) {
		this.charset = charset;
	}

	public String getCodeId() {
		return codeId;
	}

	public void setCodeId(String codeId) {
		this.codeId = codeId;
	}

	public String getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(String timestamp) {
		this.timestamp = timestamp;
	}

}
